<template>
	<el-input v-model="inputVal" :maxlength="maxlength" :show-word-limit="showwordlimit"> </el-input>
</template>

<script setup>
import { computed, ref, watch } from 'vue'
const inputVal = ref()
const props = defineProps({
	modelValue: {
		type: String,
		default: undefined
	},
	maxlength: {
		type: Number,
		default: 60
	},
	showwordlimit: {
		type: Boolean,
		default: false
	}
})
watch(
	() => props.modelValue,
	nVal => {
		inputVal.value = nVal ? nVal : ''
	}
)
</script>

<style scoped lang="scss"></style>
